{% extends "base.html" %}

{% block title %}Sign up{% endblock %}

{% block body %}

<div data-role="dialog">
	<!-- no header
	<div data-role="header">
	</div> -->
	<div data-role="content">
		<a href="/" data-role="button" class = "ui-btn-left" data-rel="back" data-icon="back" data-iconpos="notext" >back</a>

		{% if form.errors %}
		<p class="errors">Please correct the errors below: {{ form.non_field_errors }}</p>
  		{% endif %}

		<h1> 가입하기 </h1>
		
		<form method="post" action="" class="wide">
			{% csrf_token %}
			<p>
				<label for="id_name">이름:</label>
				{% if form.name.errors %}
					<p class="errors">{{ form.name.errors.as_text }}</p>
				{% endif %}
				{{ form.name }}
			</p>
			<p>
				<label for="id_username">아이디:</label>
				{% if form.username.errors %}
					<p class="errors">{{ form.username.errors.as_text }}</p>
				{% endif %}
				{{ form.username }}
			</p>
			<p>
				<label for="id_email">이메일:</label>
				{% if form.email.errors %}
					<p class="errors">{{ form.email.errors.as_text }}</p>
				{% endif %}
				{{ form.email }}
			</p>
			<p>
				<label for="id_password1">비밀번호:</label>
				{% if form.password1.errors %}
					<p class="errors">{{ form.password1.errors.as_text }}</p>
				{% endif %}
				{{ form.password1 }}
			</p>
			<p>
			      <label for="id_password2">비밀번호 (재입력):</label>
			      {% if form.password2.errors %}
				<p class="errors">{{ form.password2.errors.as_text }}</p>
			      {% endif %}
			      {{ form.password2 }}
			</p>
			<p class="submit"><input type="submit" value="가입 &rarr;"></p>
		</form>
	</div>
</div>

{% endblock %}
